package com.woniuxy.driverschool.service.impl;

import com.woniuxy.driverschool.entity.CredentialManagement;
import com.woniuxy.driverschool.mapper.CredentialManagementMapper;
import com.woniuxy.driverschool.service.CredentialManagementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * @author shkstart
 * @create 2021-10-09 10:55
 */
@Service
public class CredentialManagementServiceImpl implements CredentialManagementService {
    @Autowired
    CredentialManagementMapper credentialManagementMapper;
    //通过全科则添加学员证件信息
    @Override
    public void insertCredentialManagement(CredentialManagement credentialManagement) {
        credentialManagementMapper.insertCredentialManagement(credentialManagement);
    }
    //修改学员证件信息
    @Override
    public void updateCredentialManagement(CredentialManagement credentialManagement) {
        credentialManagementMapper.updateCredentialManagement(credentialManagement);
    }

    //分页查询信息
    @Override
    public List<CredentialManagement> selectCredentialManagementByPage(CredentialManagement credentialManagement, Integer pageIndex, Integer pageSize,
                                                                       Date getStartTime, Date getEndTime) {
        return credentialManagementMapper.selectCredentialManagementByPage(credentialManagement, pageIndex, pageSize, getStartTime, getEndTime);
    }
    //总条数
    @Override
    public int selectCountCredentialManagementByPage(CredentialManagement credentialManagement, Date getStartTime, Date getEndTime) {
        return credentialManagementMapper.selectCountCredentialManagementByPage(credentialManagement, getStartTime, getEndTime);
    }
}
